import type { AppRouteModule } from '/@/router/types';
import { RoleEnum } from '/@/enums/roleEnum';
import { LAYOUT } from '/@/router/constant';
import { t } from '/@/hooks/web/useI18n';

const example: AppRouteModule = {
  path: '/example',
  name: 'example',
  component: LAYOUT,
  redirect: '/example/index',
  meta: {
    hideChildrenInMenu: true,
    icon: 'simple-icons:about-dot-me',
    title: t('routes.example.title'),
    orderNo: 1,
  },
  children: [
    {
      path: 'index',
      name: 'examplePage',
      component: () => import('/@/views/example/index.vue'),
      meta: {
        title: t('routes.example.test'),
        icon: 'simple-icons:about-dot-me',
        hideMenu: true,
        roles: [RoleEnum.SUPER],
      },
    },
    {
      path: 'index2',
      name: 'examplePage2',
      component: () => import('/@/views/example/index2.vue'),
      meta: {
        title: t('routes.example.test'),
        icon: 'simple-icons:about-dot-me',
        hideMenu: true,
        roles: [RoleEnum.TEST],
      },
    }
  ],
};

export default example;
